package com.wh.wisdomsite.xbox.st.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.wh.wisdomsite.xbox.pr.entity.Project;
import com.wh.wisdomsite.xbox.pr.entity.UnitOperator;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 合同信息entity
 * @author 刘旭
 * @version V1.0
 * @Package com.wh.wisdomsite.xbox.st.entity
 * @date 2018年12月24日 11:17
 * @Copyright 企业版权所有
 * @Company 贵州万华科技有限公司Copyright (c) 2018
 */
@TableName("st_contract")
public class Contract extends Model<Contract> {

    /**
     * 合同id
     */
    @TableId(type = IdType.UUID)
    private String coId;

    /**
     * 项目id
     */
    @TableField("prId")
    private String prId;

    /**
     * 合同单号
     */
    @TableField("coCode")
    private String coCode;

    /**
     * 合同编号
     */
    @TableField("coNumber")
    private String coNumber;

    /**
     * 合同名称
     */
    @TableField("coName")
    private String coName;

    /**
     * 所属企业编码
     */
    @TableField("compCode")
    private String compCode;

    /**
     * 签订日期
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("signDate")
    private Date signDate;

    /**
     * 生效日期
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("startDate")
    private Date startDate;

    /**
     * 截止日期
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("endDate")
    private Date endDate;

    /**
     * 合同发起方
     */
    @TableField("initiator")
    private String initiator;

    /**
     * 合同履行方
     */
    @TableField("execute")
    private String execute;

    /**
     * 创建者
     */
    @TableField("createBy")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField("createDate")
    private Date createDate;

    /**
     * 更新者
     */
    @TableField("updateBy")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField("updateDate")
    private Date updateDate;

    /**
     * 备注信息
     */
    @TableField("remark")
    private String remark;

    /**
     * 数据状态 1:正常 2:已删除
     */
    @TableField("dataState")
    private String dataState;

    /**
     * 关联项目实体
     */
    @TableField(exist = false)
    private Project project;

    /**
     * 关联施工单位实体
     */
    @TableField(exist = false)
    private UnitOperator unitOperator;

    public String getCoId() {
        return coId;
    }

    public void setCoId(String coId) {
        this.coId = coId;
    }

    public String getPrId() {
        return prId;
    }

    public void setPrId(String prId) {
        this.prId = prId;
    }

    public String getCoCode() {
        return coCode;
    }

    public void setCoCode(String coCode) {
        this.coCode = coCode;
    }

    public String getCoNumber() {
        return coNumber;
    }

    public void setCoNumber(String coNumber) {
        this.coNumber = coNumber;
    }

    public String getCoName() {
        return coName;
    }

    public void setCoName(String coName) {
        this.coName = coName;
    }

    public String getCompCode() {
        return compCode;
    }

    public void setCompCode(String compCode) {
        this.compCode = compCode;
    }

    public Date getSignDate() {
        return signDate;
    }

    public void setSignDate(Date signDate) {
        this.signDate = signDate;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getInitiator() {
        return initiator;
    }

    public void setInitiator(String initiator) {
        this.initiator = initiator;
    }

    public String getExecute() {
        return execute;
    }

    public void setExecute(String execute) {
        this.execute = execute;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getDataState() {
        return dataState;
    }

    public void setDataState(String dataState) {
        this.dataState = dataState;
    }

    public Project getProject() {
        return project;
    }

    public void setProject(Project project) {
        this.project = project;
    }

    public UnitOperator getUnitOperator() {
        return unitOperator;
    }

    public void setUnitOperator(UnitOperator unitOperator) {
        this.unitOperator = unitOperator;
    }

    @Override
    protected Serializable pkVal() {
        return coId;
    }
}
